package TCP.Test3;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;

public class Recvice {
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket = new ServerSocket(10086);

        Socket socket = serverSocket.accept();

        InputStream inputStream = socket.getInputStream();
        InputStreamReader inputStreamReader=new InputStreamReader(inputStream);
        int b;

        while ((b= inputStreamReader.read())!=-1){
            System.out.print((char) b);
        }

        inputStream.close();

        socket.close();
    }
}


